Skip to content

Fix SDL_BlitSurfaceScaled crash #13298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

capehill
Copy link
Contributor

SDL_BlitSurfaceScaled could crash when passed large coordinates, due to final_dst.w or final_dst.h getting negative values.

Description

SDL_GetRectIntersection calls fail due to potential overflow issue so clipping is not done but there is no error to the user, until segmentation fault.

Existing Issue(s)

#7614 sounds similar.

SDL_BlitSurfaceScaled could crash when passed large coordinates, due
to final_dst.w or final_dst.h getting negative values.
@sezero sezero requested a review from slouken August 1, 2025 15:39
@slouken slouken merged commit 1c5c3b1 into libsdl-org:main Aug 1, 2025
41 checks passed
@slouken
Copy link
Collaborator

slouken commented Aug 1, 2025

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants